home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / toolkitcomps / nsIRemoteService.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  4KB  |  143 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIRemoteService.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIRemoteService_h__
  6. #define __gen_nsIRemoteService_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIDOMWindow; /* forward declaration */
  18.  
  19.  
  20. /* starting interface:    nsIRemoteService */
  21. #define NS_IREMOTESERVICE_IID_STR "a2240f6a-f1e4-4548-9e1a-6f3bc9b2426c"
  22.  
  23. #define NS_IREMOTESERVICE_IID \
  24.   {0xa2240f6a, 0xf1e4, 0x4548, \
  25.     { 0x9e, 0x1a, 0x6f, 0x3b, 0xc9, 0xb2, 0x42, 0x6c }}
  26.  
  27. /**
  28.  * Start and stop the remote service (xremote/phremote), and register
  29.  * windows with the service for backwards compatibility with old xremote
  30.  * clients.
  31.  *
  32.  * @status FLUID This interface is not frozen and is not intended for embedders
  33.  *               who want a frozen API. If you are an embedder and need this
  34.  *               functionality, contact Benjamin Smedberg about the possibility
  35.  *               of freezing the functionality you need.
  36.  */
  37. class NS_NO_VTABLE nsIRemoteService : public nsISupports {
  38.  public: 
  39.  
  40.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IREMOTESERVICE_IID)
  41.  
  42.   /**
  43.    * Start the remote service. This should not be done until app startup
  44.    * appears to have been successful.
  45.    *
  46.    * @param appName     (Required) Sets a window property identifying the
  47.    *                    application.
  48.    * @param profileName (May be null) Sets a window property identifying the
  49.    *                    profile name.
  50.    */
  51.   /* void startup (in string appName, in string profileName); */
  52.   NS_IMETHOD Startup(const char *appName, const char *profileName) = 0;
  53.  
  54.   /**
  55.    * Register a XUL window with the xremote service. The window will be
  56.    * configured to accept incoming remote requests. If this method is called
  57.    * before startup(), the registration will happen once startup() is called.
  58.    */
  59.   /* void registerWindow (in nsIDOMWindow aWindow); */
  60.   NS_IMETHOD RegisterWindow(nsIDOMWindow *aWindow) = 0;
  61.  
  62.   /**
  63.    * Stop the remote service from accepting additional requests.
  64.    */
  65.   /* void shutdown (); */
  66.   NS_IMETHOD Shutdown(void) = 0;
  67.  
  68. };
  69.  
  70. /* Use this macro when declaring classes that implement this interface. */
  71. #define NS_DECL_NSIREMOTESERVICE \
  72.   NS_IMETHOD Startup(const char *appName, const char *profileName); \
  73.   NS_IMETHOD RegisterWindow(nsIDOMWindow *aWindow); \
  74.   NS_IMETHOD Shutdown(void); 
  75.  
  76. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  77. #define NS_FORWARD_NSIREMOTESERVICE(_to) \
  78.   NS_IMETHOD Startup(const char *appName, const char *profileName) { return _to Startup(appName, profileName); } \
  79.   NS_IMETHOD RegisterWindow(nsIDOMWindow *aWindow) { return _to RegisterWindow(aWindow); } \
  80.   NS_IMETHOD Shutdown(void) { return _to Shutdown(); } 
  81.  
  82. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  83. #define NS_FORWARD_SAFE_NSIREMOTESERVICE(_to) \
  84.   NS_IMETHOD Startup(const char *appName, const char *profileName) { return !_to ? NS_ERROR_NULL_POINTER : _to->Startup(appName, profileName); } \
  85.   NS_IMETHOD RegisterWindow(nsIDOMWindow *aWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterWindow(aWindow); } \
  86.   NS_IMETHOD Shutdown(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Shutdown(); } 
  87.  
  88. #if 0
  89. /* Use the code below as a template for the implementation class for this interface. */
  90.  
  91. /* Header file */
  92. class nsRemoteService : public nsIRemoteService
  93. {
  94. public:
  95.   NS_DECL_ISUPPORTS
  96.   NS_DECL_NSIREMOTESERVICE
  97.  
  98.   nsRemoteService();
  99.  
  100. private:
  101.   ~nsRemoteService();
  102.  
  103. protected:
  104.   /* additional members */
  105. };
  106.  
  107. /* Implementation file */
  108. NS_IMPL_ISUPPORTS1(nsRemoteService, nsIRemoteService)
  109.  
  110. nsRemoteService::nsRemoteService()
  111. {
  112.   /* member initializers and constructor code */
  113. }
  114.  
  115. nsRemoteService::~nsRemoteService()
  116. {
  117.   /* destructor code */
  118. }
  119.  
  120. /* void startup (in string appName, in string profileName); */
  121. NS_IMETHODIMP nsRemoteService::Startup(const char *appName, const char *profileName)
  122. {
  123.     return NS_ERROR_NOT_IMPLEMENTED;
  124. }
  125.  
  126. /* void registerWindow (in nsIDOMWindow aWindow); */
  127. NS_IMETHODIMP nsRemoteService::RegisterWindow(nsIDOMWindow *aWindow)
  128. {
  129.     return NS_ERROR_NOT_IMPLEMENTED;
  130. }
  131.  
  132. /* void shutdown (); */
  133. NS_IMETHODIMP nsRemoteService::Shutdown()
  134. {
  135.     return NS_ERROR_NOT_IMPLEMENTED;
  136. }
  137.  
  138. /* End of implementation class template. */
  139. #endif
  140.  
  141.  
  142. #endif /* __gen_nsIRemoteService_h__ */
  143.